/**
 * 吐司
 * @param {string} title 
 * @param {string} icon 
 * @param {*} duration 
 */
function myShowToast(title, icon, duration) {
	let dur = 1000
	if (typeof duration != "undefined") {
		dur = duration
	}
	wx.showToast({
		title: title,
		icon: icon,
		duration: dur
	})
}

/**
 * 显示loading
 * @param {string} title 
 */
function myShowLoading(title) {
	wx.showLoading({
		title: title,
		mask: true
	})
}

/**
 * 隐藏loading
 */
function myHideLoading() {
	wx.hideLoading({
		success: (res) => {},
	})
}


export {
	myShowToast,
	myShowLoading,
	myHideLoading
};
